<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/../start.php');//Подключаем файл инициализацииs

$odb = Service_Database::instance();
$sql = "
SELECT *
FROM `banner`
WHERE `banner`.`adress`  LIKE 'Ленинский%' AND `banner`.`size` > 5";
$one = $odb->select($sql);
echo '<pre>';
print_r($one);
echo '</pre>';


$sql = "
SELECT *
FROM `campagins`";
$one = $odb->select($sql);
echo '<pre>';
print_r($one);
echo '</pre>';

/*

$odb = Service_Database::instance();
$sql = "
SELECT *
FROM `banner`
LEFT JOIN `banner` ON `banner`.`ID_banner` = ` firma_sheet`.`ID_sheet`
WHERE `firma_sheet`.`adres`  LIKE 'Ленинский%' AND `banner`.`size` > 5";
$one = $odb->select($sql);
echo '<pre>';
print_r($one);
echo '</pre>';
*/

?>